<?php
namespace App\Controllers;
use App\Requests\FileRequest;
use App\Services\MakeVideoService as Service;
use Framework\BaseController;
use Illuminate\Http\Request;
class MakeVideoController extends BaseController
{
    /**
     * @var Service
     */
    private $service;

    public function __construct(Service $service)
    {
        $this->service = $service;
    }


    public function conflateVideo(FileRequest $request)
    {
        $content = $request->content();
        $file = $request->file();
        $language = $request->input('language',1);
        $is_captions = $request->input('is_captions',1);
        $is_medium = $request->input('is_medium',1);
        $time = $request->input('time',5);

        $info = $this->service->conflateVideo($content,$file,$language,$is_captions,$is_medium,$time);
        $this->retSuccess($info);

    }
}
